<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="generator" content="Doxygen 1.8.10" />
    <title>ZRDDS: WaitSet类 参考</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
    <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <link href="static/css/bootstrap.css" rel="stylesheet" />
    <!-- <link href="static/css/sticky-footer-navbar.css" rel="stylesheet">
    <script type="text/javascript" src="static/js/bootstrap.js"></script> -->
    <script type="text/javascript" src="static/js/doxy-boot.js"></script>
</head>
<body>
    <div id="top">
        <!-- do not remove this div, it is closed by doxygen! -->
        <!-- end header part --><!-- 制作者 Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="namespaces.html"><span>包</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="examples.html"><span>示例</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classcom_1_1zrdds_1_1infrastructure_1_1_wait_set.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="classcom_1_1zrdds_1_1infrastructure_1_1_wait_set-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">WaitSet类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>该类型抽象等待条件 <a class="el" href="index.html#waitset-introduction">条件-等待</a> 。  
 <a href="classcom_1_1zrdds_1_1infrastructure_1_1_wait_set.html#details">更多...</a></p>

<p>继承自 AbstractNativeObject .</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ac7e7f0bc0fb5503de8837c324533d0d1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_wait_set.html#ac7e7f0bc0fb5503de8837c324533d0d1">wait</a> (<a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_condition_seq.html">ConditionSeq</a> active_conditions, <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_duration__t.html">Duration_t</a> timeout)</td></tr>
<tr class="memdesc:ac7e7f0bc0fb5503de8837c324533d0d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">阻塞等待等待集合中的条件处于触发状态。  <a href="#ac7e7f0bc0fb5503de8837c324533d0d1">更多...</a><br /></td></tr>
<tr class="separator:ac7e7f0bc0fb5503de8837c324533d0d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38e132595b26a01a13806291dde45155"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_wait_set.html#a38e132595b26a01a13806291dde45155">attach_condition</a> (<a class="el" href="interfacecom_1_1zrdds_1_1infrastructure_1_1_condition.html">Condition</a> cond)</td></tr>
<tr class="memdesc:a38e132595b26a01a13806291dde45155"><td class="mdescLeft">&#160;</td><td class="mdescRight">将指定的条件加入到该等待集合中。  <a href="#a38e132595b26a01a13806291dde45155">更多...</a><br /></td></tr>
<tr class="separator:a38e132595b26a01a13806291dde45155"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a745aff0651369641930376be255634b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_wait_set.html#a745aff0651369641930376be255634b4">detach_condition</a> (<a class="el" href="interfacecom_1_1zrdds_1_1infrastructure_1_1_condition.html">Condition</a> cond)</td></tr>
<tr class="memdesc:a745aff0651369641930376be255634b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">从等待集合中移除指定的条件。  <a href="#a745aff0651369641930376be255634b4">更多...</a><br /></td></tr>
<tr class="separator:a745aff0651369641930376be255634b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab25acb669dc6b91406142d231cf546f8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_wait_set.html#ab25acb669dc6b91406142d231cf546f8">get_conditions</a> (<a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_condition_seq.html">ConditionSeq</a> attached_conditions)</td></tr>
<tr class="memdesc:ab25acb669dc6b91406142d231cf546f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取当前该等待集合中已有的条件。  <a href="#ab25acb669dc6b91406142d231cf546f8">更多...</a><br /></td></tr>
<tr class="separator:ab25acb669dc6b91406142d231cf546f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>该类型抽象等待条件 <a class="el" href="index.html#waitset-introduction">条件-等待</a> 。 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="a38e132595b26a01a13806291dde45155"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a> attach_condition </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interfacecom_1_1zrdds_1_1infrastructure_1_1_condition.html">Condition</a>&#160;</td>
          <td class="paramname"><em>cond</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>将指定的条件加入到该等待集合中。 </p>
<p>如果添加的条件的触发状态为true，将会解开阻塞。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">cond</td><td>指明需要添加的条件。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>当前可能的返回值：<ul>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#a5d7e5ebc74fcef92e1d4489ff2ef098d" title="执行成功。 ">ReturnCode_t.RETCODE_OK</a> :添加成功；</li>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#ab4332c4207c0095156a2dcd6d3ff29fd" title="资源不够。 ">ReturnCode_t.RETCODE_OUT_OF_RESOURCES</a> :分配内存失败；</li>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#a954f75a236a7a535d4da2723bb453677" title="不正确的参数。 ">ReturnCode_t.RETCODE_BAD_PARAMETER</a> :参数不是有效的条件。 </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="a745aff0651369641930376be255634b4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a> detach_condition </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interfacecom_1_1zrdds_1_1infrastructure_1_1_condition.html">Condition</a>&#160;</td>
          <td class="paramname"><em>cond</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>从等待集合中移除指定的条件。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">cond</td><td>指明需要删除的条件。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>当前可能的返回值：<ul>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#a5d7e5ebc74fcef92e1d4489ff2ef098d" title="执行成功。 ">ReturnCode_t.RETCODE_OK</a> :添加成功；</li>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#af47437bfa8ad9c871378f6a7c603752a" title="调用操作的前置条件未满足。 ">ReturnCode_t.RETCODE_PRECONDITION_NOT_MET</a> :指定的条件不在该等待集合中；</li>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#a954f75a236a7a535d4da2723bb453677" title="不正确的参数。 ">ReturnCode_t.RETCODE_BAD_PARAMETER</a> :参数不是有效的条件。 </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="ab25acb669dc6b91406142d231cf546f8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a> get_conditions </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_condition_seq.html">ConditionSeq</a>&#160;</td>
          <td class="paramname"><em>attached_conditions</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取当前该等待集合中已有的条件。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">attached_conditions</td><td>出口参数，用于存储当前集合中的条件。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>当前可能的返回值：<ul>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#a5d7e5ebc74fcef92e1d4489ff2ef098d" title="执行成功。 ">ReturnCode_t.RETCODE_OK</a> :出口参数有效，表明处于触发状态的条件；</li>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#a954f75a236a7a535d4da2723bb453677" title="不正确的参数。 ">ReturnCode_t.RETCODE_BAD_PARAMETER</a> / <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#ab74ac22c8cc8d89bc6fd1f2221a5272d" title="执行出错。 ">ReturnCode_t.RETCODE_ERROR</a> ：用户提供的空间不足，且底层扩容失败； </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="ac7e7f0bc0fb5503de8837c324533d0d1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a> wait </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_condition_seq.html">ConditionSeq</a>&#160;</td>
          <td class="paramname"><em>active_conditions</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_duration__t.html">Duration_t</a>&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>阻塞等待等待集合中的条件处于触发状态。 </p>
<p>应用线程等待某些条件的发生，堵塞调用线程， 当调用成功时，<em>active_conditions</em> 中存放触发的条件， 不允许多个线程等待同一个等待条件。</p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">active_conditions</td><td>出口参数，用于存储处于触发状态的条件。 </td></tr>
    <tr><td class="paramname">timeout</td><td>指明最长等待时间。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>当前可能的返回值：<ul>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#a5d7e5ebc74fcef92e1d4489ff2ef098d" title="执行成功。 ">ReturnCode_t.RETCODE_OK</a> :出口参数有效，表明处于触发状态的条件；</li>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#af47437bfa8ad9c871378f6a7c603752a" title="调用操作的前置条件未满足。 ">ReturnCode_t.RETCODE_PRECONDITION_NOT_MET</a> :在多个线程上等待条件；</li>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#a954f75a236a7a535d4da2723bb453677" title="不正确的参数。 ">ReturnCode_t.RETCODE_BAD_PARAMETER</a> / <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#ab74ac22c8cc8d89bc6fd1f2221a5272d" title="执行出错。 ">ReturnCode_t.RETCODE_ERROR</a> ：用户提供的空间不足，且底层扩容失败；</li>
<li><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html#a140d3d2605cfd0751c2184489f9cbb93" title="操作超时。 ">ReturnCode_t.RETCODE_TIMEOUT</a> : 在指定的时间内没有条件处于触发状态。 </li>
</ul>
</dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>WaitSet.java</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>com</b></li><li class="navelem"><b>zrdds</b></li><li class="navelem"><a class="el" href="namespacecom_1_1zrdds_1_1infrastructure.html">infrastructure</a></li><li class="navelem"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_wait_set.html">WaitSet</a></li>
    <li class="footer">
      <a href="http://www.zrtechnology.com">&copy; Copyright (c) 2018 ZhenRong Technology, Inc. All rights reserved.</a>
    </li>
  </ul>
</div>
</body>
</html>
